home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 3776 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  1.1 KB

  1. Path: kjpoglit.!kjpoglit
  2. From: kjpoglit@kjpoglit. (Karl Poglitsch)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re:HELP !!! Memory - Allocation
  5. Date: 26 Jan 1996 01:01:45 GMT
  6. Organization: i-conn
  7. Distribution: world
  8. Message-ID: <4e995p$foa@news.iconn.net>
  9. Reply-To: kjpoglit@kjpoglit.
  10. NNTP-Posting-Host: hd-ts00-11.iconn.net
  11.  
  12. I'd probably use 
  13. new since that is 
  14. C++.  I'd probably 
  15. tried try to stick 
  16. with one 
  17. language...
  18.  
  19.  
  20. In message 
  21. <NEWTNews.751.822443
  22. 462.Postmaster@Jerus
  23. alem.netvision.net.i
  24. l>, 
  25. iti@Jerusalem.netvis
  26. ion.net.il writes:
  27.  
  28. >
  29. >
  30. >I am using Visual 
  31. C++ to write a 
  32. Windows Application 
  33. - and I am having
  34. >a memory problem. 
  35. I want to 
  36. dynamically 
  37. allocate "nTemp" 
  38. bytes of memory
  39. >to read in a char 
  40. string, or the most 
  41. memory available up 
  42. to "nTemp" 
  43. >bytes.  
  44. >
  45. >My questions being:
  46. >       1. How can I most efficiantly do this?
  47. >       2. Should I use 
  48. >                       -> pChar = (char*) malloc(nTemp); Or
  49. >                       -> pChar = new char[nTemp];
  50. >
  51. >Please send any advice you have for me to my EMail address:
  52. >       iti@netvision.net.il
  53. >
  54. >Thanks
  55. >Yaakov
  56. >
  57. >
  58.  
  59.  
  60.  
  61.